import 'package:ebuy/utils/toast.dart';
import 'package:flutter/material.dart';

import '../utils/CustomTextStyle.dart';

class CustomApply extends StatefulWidget {
  const CustomApply({super.key});

  @override
  State<CustomApply> createState() => _CustomApplyState();
}

class _CustomApplyState extends State<CustomApply> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('海关申报'), centerTitle: true),
      body: Container(
        margin: EdgeInsets.symmetric(horizontal: 20),
        child: Column(
          children: [
            applyItem('报关编号', '20232024012345678'),
            applyItem('海关编号', '20232024012345678'),
            applyItem('境内收发货人', 'Nike旗舰店'),
            applyItem('出关口岸', '中国香港'),
            applyItem('入关口岸', '中国香港'),
            applyItem('出关日期', '2024/06/23'),
            applyItem('进关日期', '2024/06/23'),
            applyItem('申报日期', '2024/06/23'),
            applyItem('备案号', '20232024012345678'),
            applyItem('境外收发货人', '耐克物流信息'),
            applyItem('商品:', 'nike运动鞋'),
            applyItem('运输公司:', 'Nike'),
            SizedBox(height: 40),
            ElevatedButton(
              onPressed: () {
                Toast.show('申请成功!');
              },
              style: ElevatedButton.styleFrom(
                backgroundColor: Colors.green,
                // 按钮背景颜色
                padding: EdgeInsets.symmetric(vertical: 12, horizontal: 60),
                // 按钮内边距
                shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(24), // 圆角边框
                ),
              ),
              child: Text(
                "申报",
                style: CustomTextStyle.textFormFieldSemiBold
                    .copyWith(color: Colors.white),
              ),
            ),
          ],
        ),
      ),
    );
  }

  Widget applyItem(String key, String value) {
    return Row(
      children: [
        Text('$key: $value'),
      ],
    );
  }

}
